from selenium import webdriver

driver = webdriver.Chrome()

# 访问58租房
url = 'http://bj.58.com/chuzu/?PGTID=0d100000-0000-1419-2f7b-56d345f4bf65&ClickID=1'
driver.get(url)

# 定位到所有的房源列表
results = driver.find_elements_by_css_selector('li[sortid]')
for i in results:
    print (i)
print(results)


driver.close()